<!DOCTYPE html >

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Pagination 分页表格</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    
    <script src="__PUBLIC__/scripts/boot.js" type="text/javascript"></script>
    
        
</head>
<body >
    <h1>用户资料</h1>      

    <div style="padding-bottom:5px;">
        
        <span>员工姓名：</span><input type="text" id="key"  />
        <input type="button" value="查找" onclick="search()"/>
        
        
    </div>
<div id="datagrid1" class="mini-datagrid" style="width:700px;height:280px;" 
    url="__APP__/User/query"  idField="id" allowResize="true"
    sizeList="[20,30,50,100]" pageSize="20"  
>
    <div property="columns">
        <div type="indexcolumn" ></div>
		
        <div field="username" width="120" headerAlign="center" allowSort="true">用户帐号</div>    
        <div field="nickname" width="120" headerAlign="center" allowSort="true">姓名</div>
        <div field="depart" width="120" headerAlign="center" allowSort="true">所在部门</div>
        <div field="position" width="120" headerAlign="center" allowSort="true">职位说明</div
        <div field="regdate" width="100" headerAlign="center"  allowSort="true">创建日期</div>                
    </div>
</div>   
   
    <script type="text/javascript">
        mini.parse();       


        var grid = mini.get("datagrid1");

        grid.load();
        

        
        //对"createtime"字段，进行降级排序
        grid.sortBy("uid", "desc");

        function search() {
            var key = document.getElementById("key").value;
            grid.load({ key: key });
        }
        $("#key").bind("keydown", function (e) {
            if (e.keyCode == 13) {
                search();
            }
        });
        ///////////////////////////////////////////////////////
       

    </script>

    <div class="description">
        <h3></h3>
        
    </div>


  

</body>
</html>